package FloorComponents;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;

import org.jhotdraw.figures.RectangleFigure;

import DimensionTools.WallDimensionTool;
import DimensionTools.WindowDimensionTool;

public class Wall extends RectangleFigure implements FloorPlanComponents {

	protected int _topLeftX;
	protected int _topLeftY;
	protected int _bottomRightX;
	protected int _bottomRightY;
	protected boolean _horizontal = true;
	public Wall(int topX, int topY, int botX, int botY) {
		_topLeftX = topX;
		_topLeftY = topY;
		_bottomRightX = botX;
		_bottomRightY = botY;
		
	}
	
	public Wall(){
		super();
	}
	
	@Override
	public void create() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void delete() {
		// TODO Auto-generated method stub
		
	}

	public void adjust(int topX, int topY, int botX, int botY) {
		_topLeftX = topX;
		_topLeftY = topY;
		_bottomRightX = botX;
		_bottomRightY = botY;
		
	}
	
	public void setHorizontal(boolean b){
		_horizontal = b;
	}
	
	@Override
	public void rotate() {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void openDimensionTool(DimensionableFigure parent) {
		
		//check this , weird parameter maybe use a this call
		
		WallDimensionTool _dt =new WallDimensionTool(parent);
	_dt.openWindow();
	
	
		System.out.println("OpeningDtool");
	//temp fix
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
	}
/*
	@Override
	public void openDimensionTool() {
		_dt.execute();
		// TODO Auto-generated method stub
		
	}
	*/

}
